Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

broccoli-file-creator

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-file-creator

Broccoli plugin to create a file.

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
161K
decreased by-5.09%
Maintainers
2
Weekly downloads
 
Created

What is broccoli-file-creator?

The broccoli-file-creator npm package is a Broccoli plugin that allows you to create files with specific content during the build process. It is useful for generating files dynamically based on the build configuration or other inputs.

What are broccoli-file-creator's main functionalities?

Create a simple file

This feature allows you to create a simple file with specified content. In this example, a file named 'file.txt' is created with the content 'Hello, world!'.

const fileCreator = require('broccoli-file-creator');
const tree = fileCreator('path/to/file.txt', 'Hello, world!');

Create a file with dynamic content

This feature allows you to create a file with dynamic content. In this example, a file named 'build-info.txt' is created with the current build time as its content.

const fileCreator = require('broccoli-file-creator');
const dynamicContent = `Build time: ${new Date().toISOString()}`;
const tree = fileCreator('path/to/build-info.txt', dynamicContent);

Create multiple files

This feature allows you to create multiple files with different content. In this example, two files 'file1.txt' and 'file2.txt' are created with their respective content.

const fileCreator = require('broccoli-file-creator');
const tree1 = fileCreator('path/to/file1.txt', 'Content for file 1');
const tree2 = fileCreator('path/to/file2.txt', 'Content for file 2');

Other packages similar to broccoli-file-creator

Keywords

FAQs

Package last updated on 17 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc